<!--
*Author：富行天下团队

 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/Mall/Small_user_distributors.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
      :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields"
      :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from "@/extension/mall/Small_user_distributors_query.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: "id",
        footer: "Foots",
        cnName: "分销员查看",
        name: "Small_user_distributors",
        url: "/Small_user_distributors/",
        sortName: "createDate",
      },
      extend: extend,
      editFormFields: {},
      editFormOptions: [],
      searchFormFields: { name: "", phone: "" },
      searchFormOptions: [
        [
          { title: "姓名", field: "name", type: "like" },
          { title: "手机号", field: "phone", type: "like" },
        ],
      ],
      columns: [
        {
          field: "head_img",
          title: "头像",
          type: "img",
          width: 120,
          align: "left",
        },
        {
          field: "id",
          title: "id",
          type: "int",
          width: 90,
          hidden: true,
          readonly: true,
          require: true,
          align: "left",
        },
        {
          field: "name",
          title: "姓名",
          type: "string",
          width: 120,
          align: "left",
        },
        {
          field: "phone",
          title: "手机号",
          type: "string",
          width: 160,
          align: "left",
        },
        {
          field: "nickname",
          title: "昵称",
          type: "string",
          width: 90,
          align: "left",
        },
        {
          field: "grade",
          title: "等级",
          type: "string",
          bind: { key: "sharelevel", data: [] },
          width: 90,
          align: "left",
        },
        {
          field: "withdraw_deposit_type",
          title: "提现方式",
          type: "string",
          bind: {
            key: "",
            data: [
              {
                key: "1",
                value: "按月",
              },
              {
                key: "2",
                value: "实时",
              },
            ],
          },
          width: 90,
          align: "left",
        },
        //    {field:'achievement',title:'直推分销业绩',type:'string',width:120,align:'left',sortable:true},
        // { field: 'commission', title: '累计佣金', type: 'decimal', width: 90, align: 'left' },
        // { field: 'consumption', title: '消费金额', type: 'decimal', width: 90, align: 'left' },
        //    {field:'numberofdistributors',title:'一级分销商人数',type:'int',width:120,align:'left'},
        //    {field:'numberofusers',title:'一级用户人数',type:'int',width:120,align:'left'},
        {
          field: "parentname",
          title: "上级名称",
          type: "string",
          width: 90,
          align: "left",
        },
        {
          field: "parentphone",
          title: "上级手机号",
          type: "string",
          width: 160,
          align: "left",
        },
        // { field: 'creator', title: '创建人名称', type: 'string', width: 120, align: 'left' },
        {
          field: "createDate",
          title: "创建时间",
          type: "datetime",
          width: 190,
          align: "left",
          sortable: true,
        },
        // { field: 'modifier', title: '修改人名称', type: 'string', width: 120, align: 'left' },
        // { field: 'modifyDate', title: '修改时间', type: 'datetime', width: 190, align: 'left', sortable: true },
        //    {field:'createDate',title:'创建时间',type:'datetime',width:90,align:'left',sortable:true},
        //    {field:'modifierID',title:'修改人id',type:'int',width:90,align:'left'},

        //    {field:'createID',title:'创建人id',type:'int',width:90,hidden:true,align:'left'},
      ],

      detail: {
        cnName: "#detailCnName",
        columns: [],
        sortName: "",
        key: "",
      },
    };
  },
};
export default vueParam;
</script>
